.sidebar {
    min-height: 100vh;
    background-color: #343a40;
    padding: 20px 0;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.8rem 1.5rem;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

.main-content {
    padding: 20px;
}

.tab-close {
    margin-left: 8px;
    cursor: pointer;
}

.nav-tabs .nav-link {
    cursor: pointer;
}

/* 固定列表区域高度 */
.card-body {
    overflow-y: auto;
}

.audit-image-preview {
    width: 320px;
    height: 640px;
    border: 1px solid #ddd;
    margin-right: 20px;
}

.infinite-scroll {
    height: calc(100vh - 200px);
    overflow-y: auto;
}

/* 确保内容区域填充整个视口 */
.container-fluid {
    min-height: 100vh;
    padding: 0;
}

/* 确保表格头部固定 */
.table-responsive {
    height: calc(100vh - 200px);
    overflow-y: auto;
}

.table thead th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

/* 添加按钮最小宽度样式 */
.btn-success {
    min-width: 120px;
    white-space: nowrap;
}

/* 调整 SweetAlert2 弹窗样式 */
.swal2-popup {
    width: 32em !important;  /* 调整弹窗宽度 */
}

.swal2-popup .swal2-html-container {
    margin: 1em 1.6em 0.3em;  /* 调整内容区域边距 */
}

/* 移动端预览相关样式 */
.mobile-editor {
    display: flex;
    flex-direction: column;
    width: 375px !important;
    margin: 0 auto;
    border: none !important;
}

/* 工具栏样式 */
.mobile-editor .ql-toolbar.ql-snow {
    width: 375px !important;
    padding: 8px !important;
    border: 1px solid #ccc !important;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    background: #f8f9fa;
}

/* 编辑区域样式 */
.mobile-editor .ql-container.ql-snow {
    width: 375px !important;
    height: 300px !important;
    border: 1px solid #ccc !important;
    border-top: none !important;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* 编辑器内容区域样式 */
.mobile-editor .ql-editor {
    padding: 12px !important;
    font-size: 14px;
    line-height: 1.6;
}

/* 工具栏按钮样式 */
.mobile-editor .ql-toolbar.ql-snow .ql-formats {
    margin-right: 8px !important;
}

.mobile-editor .ql-toolbar.ql-snow .ql-formats:last-child {
    margin-right: 0 !important;
}

/* 图片样式 */
.mobile-editor .ql-editor img {
    max-width: 100% !important;
    height: auto !important;
    margin: 10px 0;
}

/* 手机预览容器 */
.mobile-preview-wrapper {
    width: 375px; /* iPhone 标准宽度 */
    margin: 20px auto;
    border: 10px solid #1a1a1a;
    border-radius: 40px;
    position: relative;
    background: #fff;
}

/* 手机预览顶部 */
.mobile-preview-header {
    height: 20px;
    background: #1a1a1a;
    position: relative;
}

.mobile-preview-header:before {
    content: '';
    position: absolute;
    width: 50%;
    max-width: 120px;
    height: 20px;
    background: #1a1a1a;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

/* 手机预览内容区 */
.mobile-preview-content {
    height: 667px; /* iPhone 8 高度 */
    overflow-y: auto;
    padding: 10px;
}

/* 预览内容中的图片样式 */
.mobile-preview-content img {
    width: 100% !important;
    height: auto !important;
    margin: 10px 0;
}

/* 手机预览底部 */
.mobile-preview-footer {
    height: 4px;
    background: #1a1a1a;
    position: relative;
}

.mobile-preview-footer:before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    background: #1a1a1a;
    border-radius: 50%;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

/* 状态标签容器样式 */
.status-badge-container {
    position: relative;
    display: inline-block;
    margin-bottom: 5px;
}

/* 所有标签通用样式 */
.badge {
    white-space: nowrap;
    opacity: 0.85 !important;
}

/* 小标签样式 */
.badge.rounded-pill {
    font-size: 0.65em !important;
    white-space: nowrap;
    z-index: 1;
}

/* 状态标签背景色 */
.badge.bg-secondary {
    background-color: rgba(108, 117, 125, 0.85) !important;
}

.badge.bg-warning {
    background-color: rgba(255, 193, 7, 0.85) !important;
}

.badge.bg-success {
    background-color: rgba(25, 135, 84, 0.85) !important;
}

.badge.bg-dark {
    background-color: rgba(33, 37, 41, 0.85) !important;
}

/* 用户ID标签特殊样式 */
.user-id-badge {
    background-color: rgba(33, 37, 41, 0.85) !important;
    font-family: monospace;
}

/* 审核列表容器 */
.card-body[ref="listContainer"] {
    height: calc(100vh - 200px);
    overflow-y: auto;
}

/* 图片预览容器 */
.image-preview-container {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.image-preview-container img {
    max-width: 100%;
    width: auto;
    max-height: calc(100vh - 200px);
    object-fit: contain;
    margin: 0;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 列表项样式 */
.list-group-item {
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.list-group-item:hover {
    background-color: rgba(0,0,0,0.02);
}

.list-group-item.active {
    background-color: #f8f9fa !important;
    border-color: #0d6efd !important;
    border-left-color: #0d6efd !important;
    color: inherit !important;
}

.list-group-item.active .text-muted {
    color: #6c757d !important;
}

/* 审核页面布局样式 */
.audit-container {
    height: calc(100vh - 32px); /* 减去padding的高度 */
    display: flex;
    flex-direction: column;
}

/* 审核列表和详情的容器 */
.audit-content {
    flex: 1;
    min-height: 0; /* 重要：防止flex子元素溢出 */
}

/* 审核列表容器 */
.audit-list-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.audit-list-container .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.audit-list-container .card-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* 审核详情容器 */
.audit-detail-container {
    height: 100%;
}

.audit-detail-container .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.audit-detail-container .card-body {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

/* 确保图片预览区域占满可用空间 */
.audit-detail-container .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.audit-detail-container .card-body {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

/* 审核状态标签样式 */
.review-status-badge {
    font-size: 0.7em !important;
    padding: 0.25em 0.6em !important;
}

/* 通过状态 */
.review-status-badge.bg-success {
    background-color: rgba(25, 135, 84, 0.85) !important;
}

/* 拒绝状态 */
.review-status-badge.bg-danger {
    background-color: rgba(220, 53, 69, 0.85) !important;
}

/* 确保列表项选中状态下标签依然清晰可见 */
.list-group-item.active .badge {
    opacity: 1 !important;
}

/* 审核信息表格样式 */
.audit-info-table {
    font-size: 0.9rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.audit-info-row {
    display: flex;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.audit-info-row:last-child {
    border-bottom: none;
}

.audit-info-label {
    width: 100px;
    padding: 8px;
    background: rgba(0,0,0,0.02);
    border-right: 1px solid rgba(0,0,0,0.1);
    font-weight: 500;
}

.audit-info-value {
    flex: 1;
    padding: 8px;
    min-width: 0;
}

/* 编辑状态样式 */
.audit-info-value .form-control-sm {
    height: 24px;
    padding: 2px 8px;
}

.audit-info-value .btn-link {
    color: #6c757d;
    text-decoration: none;
}

.audit-info-value .btn-link:hover {
    color: #0d6efd;
}

/* 选中状态下保持文字可读性 */
.list-group-item.active .audit-info-label {
    background: rgba(0,0,0,0.05);
}

.list-group-item.active .audit-info-table {
    border-color: rgba(0,0,0,0.15);
}

/* 审核列表行样式 */
.audit-list-row {
    padding: 8px 15px;
    border-left: 3px solid transparent;
}

.audit-list-row:hover {
    background-color: rgba(0,0,0,0.02);
}

.audit-list-row.active {
    background-color: #f8f9fa !important;
    border-left-color: #0d6efd !important;
}

/* 单元格样式 */
.audit-cell {
    padding: 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 内容单元格可以折行 */
.audit-cell.flex-grow-1 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* 自定义字段编辑框样式 */
.audit-cell .form-control-sm {
    height: 22px;
    padding: 0 4px;
    font-size: 0.875rem;
}

/* 调整图片预览容器 */
.image-preview-container {
    padding: 10px;
}

.image-preview-container img {
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 250px);
}

/* 确保所有文字在一行内显示 */
.text-truncate {
    max-width: 100%;
}

/* 调整列表容器的内边距 */
.audit-list-container .card-body {
    padding: 0;
}

/* 自定义字段编辑状态 */
.audit-cell .btn-link {
    padding: 0;
    font-size: 0.875rem;
}

/* 自定义字段容器样式 */
.custom-fields-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.custom-field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.custom-field-item {
    display: inline-flex;
    align-items: center;
    background: rgba(0,0,0,0.03);
    padding: 2px 8px;
    border-radius: 4px;
    margin: 2px;
}

.field-label {
    color: #666;
    font-size: 0.85rem;
    margin-right: 4px;
    white-space: nowrap;
}

.field-value {
    display: flex;
    align-items: center;
    gap: 4px;
}

.field-edit {
    width: 80px;
}

.field-edit .form-control-sm {
    height: 22px;
    padding: 0 4px;
    font-size: 0.85rem;
}

.edit-btn {
    padding: 0;
    font-size: 0.85rem;
    color: #6c757d;
    opacity: 0.5;
}

.custom-field-item:hover .edit-btn {
    opacity: 1;
}

/* 调整单元格宽度 */
.audit-cell.flex-grow-1 {
    min-width: 200px;
}

/* 自定义字段样式调整 */
.custom-field-item {
    display: inline-flex;
    align-items: center;
    background: rgba(0,0,0,0.03);
    padding: 2px 8px;
    border-radius: 4px;
    margin: 2px;
}

.field-value .form-control-sm {
    width: 80px;
    height: 24px;
    padding: 2px 6px;
    font-size: 0.85rem;
    border: 1px solid rgba(0,0,0,0.1);
    background: white;
}

.field-value .form-control-sm:focus {
    border-color: #0d6efd;
    box-shadow: none;
}

/* 列表单元格基础样式 */
.audit-cell {
    padding: 0 8px;
    overflow: hidden;
    min-width: 0;
}

/* ID列 */
.cell-id {
    flex-shrink: 0;
}

/* 模板名称列 */
.cell-template {
    flex-shrink: 0;
    font-weight: 500;
}

/* 图片数量列 */
.cell-images {
    flex-shrink: 0;
    text-align: center;
}

/* 状态列 */
.cell-status {
    flex-shrink: 0;
}

/* 内容列 */
.cell-content {
    flex-shrink: 0;
}

/* 自定义字段列 */
.cell-custom {
    padding-left: 16px;
    border-left: 1px solid rgba(0,0,0,0.1);
}

/* 自定义字段容器 */
.custom-fields-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.custom-field-item {
    display: inline-flex;
    align-items: center;
    background: rgba(0,0,0,0.03);
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
}

.field-label {
    color: #666;
    font-size: 0.85rem;
    margin-right: 6px;
    white-space: nowrap;
}

.field-value input {
    width: 80px;
    height: 24px;
    padding: 2px 6px;
    font-size: 0.85rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 3px;
}

/* 列表行样式 */
.audit-list-row {
    padding: 8px 12px;
}

/* 确保所有文字在一行内显示 */
.text-truncate {
    max-width: 100%;
}

/* 选中状态样式 */
.audit-list-row.active .cell-custom {
    border-left-color: rgba(0,0,0,0.15);
} 